import BaseStore from "@/base/BaseStore";

export default class Store extends BaseStore{
    constructor(props,config, action) {
        super(props, config, action)
        this.state = this.getInitialState()
    }

    getInitialSo() {
        return {
        }
    }

    onGetData(){
        this.setState({loading:true})
    }

    onGetDataCompleted(res){
        this.setState({loading:false})
        super.dealResponse(res,()=>{
            let {vo} = res;
            this.setState({data:vo});
        })
    }

    onPreCreateWithdrawal(withdrawalData){
        this.setState({modalStatus:"withdrawal", withdrawalData})
    }
    onCreateWithdrawal(){
        this.setState({detailLoading:true})
    }
    onCreateWithdrawalCompleted(callback,res){
        this.setState({detailLoading:false});
        super.dealCommonResponse(res,()=>{
            callback && callback();
            super.refreshList();
        })
    }

}